<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%@page import="com.scalar.chiptrack.utils.ConfigManager"%>

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>

<chiptrack:checkLogon sourcePage="/productAvailabiltiy.do" />

<%String chipTracContext = "/" + ConfigManager.getChipTracContext();%>

<HTML><HEAD><TITLE>Scalarsoft - ChipTrac</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type=text/css rel=stylesheet>
<script>
var dateElement = "";
    function openCalendar(dateValue)
    {
	dateElement = dateValue;
  	newWindow = window.open('<%=chipTracContext%>/jsp/includes/calendar.html','optionsPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=no,scrollbars=no,width=180,height=440,resizable=no');
  	newWindow.moveTo(550,180);
  	newWindow.focus();
    }
	function assignDate(passedValue)
    {   
	dateElement.value=passedValue;
	window.focus();
    }
function dateRange(){

var period="";
var cat="";

document.productavReport.prompt2.value=document.productavReport.fromdate.value
document.productavReport.prompt3.value=document.productavReport.todate.value

if(document.productavReport.prompt2.value=='')
document.productavReport.prompt2.value='0';

if(document.productavReport.prompt3.value=='')
document.productavReport.prompt3.value='0';

for (counter = 0; counter < productavReport.category.length; counter++)
{
if (productavReport.category[counter].checked){
	cat = productavReport.category[counter].value;
	}
}

for (counter = 0; counter < productavReport.periodically.length; counter++)
{
if (productavReport.periodically[counter].checked){
	period = productavReport.periodically[counter].value;
	}
}

if ( cat == "textop" && period=="reqDate")
{
   if(document.productavReport.prompt1.value=='')
	document.productavReport.prompt1.value ='0' 
   
document.productavReport.prompt4.value='RequestDate';
document.productavReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Operations/Product_availability_reqdate.rpt&subReport=open_order";
document.productavReport.submit();
}

else if ( cat == "graphop" && period=="reqDate")
{
if(document.productavReport.prompt2.value=='0')
document.productavReport.prompt2.value='';
document.productavReport.prompt1.value=document.productavReport.prompt2.value

if(document.productavReport.prompt3.value=='0')
document.productavReport.prompt3.value='';
document.productavReport.prompt2.value=document.productavReport.prompt3.value

document.productavReport.prompt4.value='RequestDate';
document.productavReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Operations/Product_availability_reqdate_graph.rpt";
	document.productavReport.submit();
}

else if ( cat == "textop" && period=="scheduleDate")
{
	document.productavReport.prompt4.value='ScheduleDate';

	if(document.productavReport.prompt1.value=='')
	document.productavReport.prompt1.value ='0' 
    document.productavReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Operations/Product_availability_schdate.rpt&subReport=open_order";
	document.productavReport.submit();
}

else if ( cat == "graphop" && period=="scheduleDate")
{
	document.productavReport.prompt4.value='ScheduleDate';
	if(document.productavReport.prompt2.value=='0')
    document.productavReport.prompt2.value='';
	document.productavReport.prompt1.value=document.productavReport.prompt2.value
    if(document.productavReport.prompt3.value=='0')
    document.productavReport.prompt3.value='';
	document.productavReport.prompt2.value=document.productavReport.prompt3.value
	document.productavReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Operations/Product_availability_schdate_graph.rpt";
	document.productavReport.submit();
}
}


</script>
<META content="MSHTML 5.50.4807.2300" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
<form name =productavReport method="post">
<input type="hidden" name="prompt2">
<input type="hidden" name="prompt3">
<input type="hidden" name="prompt4">

<!-- Top Header Start-->
<%@ include file="/jsp/includes/header.jsp" %>
<!-- Top Header End-->

<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
	<td width='180' valign='top' background='<%=chipTracContext%>/jsp/includes/images/left_red_bg.gif'>

<!-- Side Navigation start -->
<%@ include file="/jsp/operations/operations_menu.jsp" %>
<!-- end of the side navigations -->
<TD bgcolor="#ffffff">
<IMG height=9 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=8></TD>
<TD bgcolor="#ffffff"><IMG height=480 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=2></TD>
<TD valign="top" width="100%">

<IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/clear.gif" width=500 border=0>
<BR>
<!-- from here your body starts -->


<center><span class="NArialW">Product Inventory</span></center>
<img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20>


  <table border="0" width="90%" align=right>
    <tr>
      <td width="15%"><font class="NArialL">Product</font></td>
      <td width="20%"><select size="1" name="prompt0" class="txfield">
	  <option value="0">Select Any product</option>
<logic:iterate id="mktgPartNumberSelectList" name="mktgPartNumberSelectList">
<logic:notEqual name="mktgPartNumberSelectList" value="null">
<option value = <bean:write name="mktgPartNumberSelectList" property="processStepId"/>>
<bean:write name="mktgPartNumberSelectList" property="marketingPartNo"/>
</option>
</logic:notEqual>
</logic:iterate>  
</select>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>


       <td width="13%"><font class="NArialL">Process</font></td>
	   <td width="20%"><font class="NArialL">
	     		<select size="1" name="prompt1" class="txfield">
			      <option value="0">Select Process Step </option>
		<option value="FAB">FAB</option>
		<option value="SORT">SORT</option>
		<option value="ASSEMBLY">ASSEMBLY</option>
		<option value="TEST">TEST</option>
		<option value="Wafer Store">WAFER STORE</option>
		<option value="Die Bank">DIE BANK</option>
		<option value="Class Store">CLASS STORE</option>
		<option value="Mark and Pack">MARK&PACK</option>
		<option value="Finished Goods">FINISHED GOODS</option>
        </select></font></td>
      
    </tr>
    <tr><td colsapn=4><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>
    <tr>
      <td width="15%"><font class="NArialL">From-Date</font></td>
      <td width="20%"><font class="NArialL">
      	<input type="text" name="fromdate" size="20" class="txfield"></font>&nbsp;&nbsp;&nbsp;
      <a href="javascript:openCalendar(document.productavReport.fromdate)">
	  <img border="0" src="<%=chipTracContext%>/jsp/includes/images/date_selector.gif" height=20 width=20></a>
	  </td>
      <td width="13%"><font class="NArialL">To-Date</font></td>
      <td width="20%"><font class="NArialL">
      	<input type="text" name="todate" size="20" class="txfield"></font>&nbsp;&nbsp;&nbsp;
      	 <a href="javascript:openCalendar(document.productavReport.todate)">
		 <img border="0" src="<%=chipTracContext%>/jsp/includes/images/date_selector.gif" height=20 width=20></a></td>
       <td width="20%">&nbsp;</td>
    </tr>
    <tr><td colsapn=4><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>
    <tr>
		<td width="15%" colspan=4>
		<font class="NArialL"><input type=radio name="periodically" value="scheduleDate" checked>
	  	By schedule date</font>&nbsp;&nbsp;&nbsp;&nbsp;
		<font class="NArialL"><input type=radio name="periodically" value="reqDate">
	  	By request date</font>&nbsp;&nbsp;&nbsp;&nbsp;</td>

	 <tr><td colsapn=4><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>

		<td width="15%" colspan=4><font class="NArialL"><input type=radio name="category" value="textop" checked>
	  	Text Output</font>&nbsp;&nbsp;&nbsp;&nbsp;
	  	<font class="NArialL"><input type=radio name="category" value="graphop">
	  	Graphical Output</font>&nbsp;&nbsp;&nbsp;&nbsp;</td>

	</tr>
    <tr><td colsapn=4><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td></tr>
    <tr><td colspan=4>
        </td></tr>
    <tr><td colsapn=4><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td></tr>
	<tr>
    <td colspan=6 align=center><a href="javascript:dateRange()"><img border="0"
      src="<%=chipTracContext%>/jsp/includes/images/submit.gif" width="53" height="17"></a>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <img border="0" src="<%=chipTracContext%>/jsp/includes/images/cancel.gif" width="53" height="17"></td>
    </tr>
  </table>

<!-- till here -->
<BR><BR><BR></TD>
<TD bgcolor="#ffffff"><IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=1></TD>
</TR>
</TABLE>
<!-- Footer starts here -->
<%@ include file="/jsp/includes/footer.jsp" %>

<!-- footer end here -->
</form>
</BODY>
</HTML>
